const echarts = require("echarts")

const option = {
  title: {
    text: '',
    textStyle: {
      fontWeight: 'normal',
      fontSize: 16,
      color: 'white'
    },
    left: '6%'
  },
  tooltip: {
    trigger: 'axis',
    axisPointer: {
      lineStyle: {
        color: '#57617B'
      }
    }
  },
  legend: {
    icon: 'rect',
    itemWidth: 14,
    itemHeight: 5,
    itemGap: 13,
    data: ['载体得分'],
    right: '4%',
    textStyle: {
      fontSize: 12,
      color: 'white'
    }
  },
  grid: {
    left: '3%',
    right: '4%',
    bottom: '3%',
    containLabel: true
  },
  xAxis: [{
    type: 'category',
    boundaryGap: false,
    axisLine: {
      lineStyle: {
        color: 'white'
      }
    },
    data: ['1月',
      '2月',
      '3月',
      '4月',
      '5月',
      '6月',
      '7月',
      '8月',
      '9月',
      '10月',
      '11月',
      '12月',]
  }],
  yAxis: [{
    type: 'value',
    name: '',
    max: 100,
    axisTick: {
      show: false
    },
    axisLine: {
      show: true,
      lineStyle: {
        color: "white", //y轴线的颜色（若只设置了y轴线的颜色，未设置y轴文字的颜色，则y轴文字会默认跟设置的y轴线颜色一致）
        type: "solid", //y轴线为实线
      },
    },

    axisLabel: {
      margin: 10,
      textStyle: {
        fontSize: 14,
      },
      formatter: '{value} 分'
    },
    splitLine: {
      lineStyle: {
        color: 'white'
      }
    }
  }],
  series: [{
    name: '载体得分',
    type: 'line',
    smooth: true,
    symbol: 'circle',
    symbolSize: 5,
    showSymbol: false,
    lineStyle: {
      normal: {
        width: 3
      }
    },
    areaStyle: {
      normal: {
        color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
          offset: 0,
          color: 'rgba(16,97,204, 0.3)'
        }, {
          offset: 0.8,
          color: 'rgba(17,235,210, 0)'
        }], false),
        shadowColor: 'rgba(0, 0, 0, 0.1)',
        shadowBlur: 10
      }
    },
    itemStyle: {
      normal: {
        label: { show: true },
        color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
          offset: 0,
          color: 'rgba(16,97,204,1)'
        }, {
          offset: 1,
          color: 'rgba(17,235,210,1)'
        }])
      },
      emphasis: {
        color: 'rgb(0,196,132)',
        borderColor: 'rgba(0,196,132,0.2)',
        extraCssText: 'box-shadow: 8px 8px 8px rgba(0, 0, 0, 1);',
        borderWidth: 10
      }
    },
    data: [0, 0, 0, 51, 60.5, 69.9, 0, 0, 0, 0, 0, 0]
  }]
};
export default option